/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package arbitration.logic.formatter;

import java.util.Formatter;

/**
 *
 * @author prophet
 */
public class PriceFormatter implements TextFieldFormatter{    
    
    public String valueToString(Object ob) {
        Double d=(Double)ob;
        Formatter f = new Formatter();
        String s = f.format("%,.2f", d).toString();       
        return s;
    }

    public Object stringToValue(String str) {
        return str.replaceAll(String.valueOf((char)160), "");
    }

}
